﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DX_SourceOutliner
{
    public class NodeProcessorSelector
    {
        public IEnumerable<INodeProcessor> GetProcessors(NodeOptions options)
        {
            IList<INodeProcessor> processors = new List<INodeProcessor>();

            if (options.IncludeParameterNamesInMethodSignatures)
                processors.Add(new NamedParametersNameProcessor());
            else
                processors.Add(new UnadornedNameProcessor());

            //TODO: find a way to somehow enfore this in code
            //only add after all other display-name-related processors have been added
            if (options.IncludeReturnTypesInMethodSignatures)
                processors.Add(new ReturnTypeNameAppenderProcessor());

            processors.Add(new ToolTipProcessor());
            processors.Add(new IconNodeProcessor());
            processors.Add(new SupportedElementTypesNodeProcessor(options));

            if (options.FilterActive)
            {
                processors.Add(new VisibilityByAccessibilityProcessor(options));
                processors.Add(new VisibilityByElementTypeProcessor(options));
            }

            return processors;
        }

    }
}
